package com.xique.job.task;

import com.xique.park.api.ParkStatisticsInOutService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 车次统计定时任务处理类
 *
 * @author xique
 */
@Slf4j
@RequiredArgsConstructor
@Component
public class ParkStatisticsInOutTask {

    private final ParkStatisticsInOutService parkStatisticsInOutService;

    /**
     * 昨日车次统计
     */
    public void yesterdayStatisticsInOut() {
        log.info("[定时任务]-昨日车次统计");
        long startTime = System.currentTimeMillis();
        parkStatisticsInOutService.yesterdayStatisticsInOut();
        log.info("[定时任务]-昨日车次统计执行时间：{}", System.currentTimeMillis() - startTime);
    }

}
